package com.uzai.console.service.feign;

import com.uzai.console.common.UzaiRespVo;
import com.uzai.console.dto.feign.jdorder.*;
import com.uzai.console.service.feign.impl.JdOrderFeignFallbackFactory;
import com.uzai.console.vo.jd.jdorder.feign.JdOrderBindVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Auther: jianghan
 * @Date: 2021/11/24 16:22
 * @Description:
 */
@Component
@FeignClient(value = "uzai-order-server", fallbackFactory = JdOrderFeignFallbackFactory.class)
public interface JdOrderFeignService {

    /**
     * 京东订单确认收货
     * @author jitwxs
     * @date 2021/11/29 10:25
     * @param jdOrderSettledDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/settled/jd/order")
    UzaiRespVo<Object> settled(@RequestBody JdOrderSettledDto jdOrderSettledDto);

    /**
     * 京东订单解冻
     * @author jitwxs
     * @date 2021/11/29 10:26
     * @param jdOrderUnfreezeDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/unfreeze/jd/sync")
    UzaiRespVo<Object> unfreeze(@RequestBody JdOrderUnfreezeDto jdOrderUnfreezeDto);

    /**
     * 京东订单解绑用户
     * @author jitwxs
     * @date 2021/11/29 10:26
     * @param jdOrderUnbindDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/unbind/jd/sync")
    UzaiRespVo<Object> unbind(@RequestBody JdOrderUnbindDto jdOrderUnbindDto);

    /**
     * 京东订单绑定用户
     * @author jitwxs
     * @date 2021/11/29 10:26
     * @param jdOrderBindDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/bind/jd/async")
    UzaiRespVo<Object> bind(@RequestBody JdOrderBindDto jdOrderBindDto);

    /**
     * 京东订单拉取接口
     * @author jitwxs
     * @date 2021/11/29 10:26
     * @param jdOrderPullDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/pull/jd/orderByToken")
    UzaiRespVo<Boolean> pull(@RequestBody JdOrderPullDto jdOrderPullDto);


    /**
     * 京东订单通过api拉取接口
     * @author jitwxs
     * @date 2021/11/29 10:26
     * @param jdOrderDownloadDto
     * @return com.uzai.console.common.UzaiRespVo<java.lang.Boolean>
     */
    @PostMapping("/jd/order/download")
    UzaiRespVo<Boolean> jdOrderDownload(@RequestBody JdOrderDownloadDto jdOrderDownloadDto);
}
